/* 
 * Copyright (c) 2014 zepolar.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *    zepolar - initial API and implementation and/or initial documentation
 */
package ec.gob.magap.model.upa;

import java.util.ArrayList;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;

import ec.gob.magap.model.general.AnimalSpecies;

/**
 *
 * @author zepolar
 */
@Entity
public class Livestock extends ProductionUnit {

    /**
     *
     */
    private static final long serialVersionUID = 1L;
    @ManyToOne
    private AnimalSpecies animalSpecies;

    @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
    private List<DetailInnovation> innovationList;

    @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
    private List<Entrepreneurship> entrepreneurshipList;

    @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
    private List<LivestockProductivity> livestockProductivityList;

    public Livestock() {
        this.innovationList = new ArrayList();
        this.entrepreneurshipList = new ArrayList();
        this.livestockProductivityList = new ArrayList();
    }

    public AnimalSpecies getAnimalSpecies() {
        return animalSpecies;
    }

    public void setAnimalSpecies(AnimalSpecies animalSpecies) {
        this.animalSpecies = animalSpecies;
    }

    public List<DetailInnovation> getInnovationList() {
        return innovationList;
    }

    public void setInnovationList(List<DetailInnovation> innovationList) {
        this.innovationList = innovationList;
    }

    public List<Entrepreneurship> getEntrepreneurshipList() {
        return entrepreneurshipList;
    }

    public void setEntrepreneurshipList(List<Entrepreneurship> entrepreneurshipList) {
        this.entrepreneurshipList = entrepreneurshipList;
    }

    public List<LivestockProductivity> getLivestockProductivityList() {
        return livestockProductivityList;
    }

    public void setLivestockProductivityList(
            List<LivestockProductivity> livestockProductivityList) {
        this.livestockProductivityList = livestockProductivityList;
    }

}
